set(BIN_NAME ut_dev_test)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(UT-Core CONFIG REQUIRED)
find_package(UT-Log CONFIG REQUIRED)
find_package(UT-JSON CONFIG REQUIRED)
find_package(UT-DBus CONFIG REQUIRED)

add_custom_target(gen-dbus-adaptor-file
        ut-dbus-xml2cpp dbus-example.xml --adaptor=${CMAKE_CURRENT_BINARY_DIR}/exampleadaptor.h
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
        COMMENT "Generate dbus adaptor files...")

include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(${BIN_NAME} main.cpp exampleservice.cpp)
add_dependencies(${BIN_NAME} gen-dbus-adaptor-file)
target_link_libraries(${BIN_NAME} UT::Core UT::Log UT::JSON UT::DBus)